﻿namespace JxcLite.Services;

public interface IReportService : IService
{
    Task<PagingResult<BillDetailInfo>> QueryBillDetailsAsync(PagingCriteria criteria);
    Task<PagingResult<ProfitInfo>> QueryProfitsAsync(PagingCriteria criteria);
}

[Client]
class ReportClient(HttpClient http) : ClientBase(http), IReportService
{
    public Task<PagingResult<BillDetailInfo>> QueryBillDetailsAsync(PagingCriteria criteria)
    {
        return Http.QueryAsync<BillDetailInfo>("/Report/QueryBillDetails", criteria);
    }

    public Task<PagingResult<ProfitInfo>> QueryProfitsAsync(PagingCriteria criteria)
    {
        return Http.QueryAsync<ProfitInfo>("/Report/QueryProfits", criteria);
    }
}